package com.feng.zshop.backend.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 商品添加
 * @author Lee
 * @date 2019/2/17
 */
@Data
public class ProductVO implements Serializable {

    /**
     * 商品id
     */
    private Integer id;

    /**
     * 商品名称
     */
    @NotBlank
    @Length(min = 1,max = 20)
    private String name;

    /**
     * 商品价格
     */
    @NotNull
    private Double price;

    /**
     * 商品图片
     */
    @NotNull
    private CommonsMultipartFile file;

    /**
     * 商品类型id
     */
    @NotNull
    private Integer productTypeId;

}
